\(\int (d+e x)^2 (c d^2+2 c d e x+c e^2 x^2)^p \, dx\) [1101]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 30, antiderivative size = 43 \[ \int (d+e x)^2 \left (c d^2+2 c d e x+c e^2 x^2\right )^p \, dx=\frac {(d+e x) \left (c d^2+2 c d e x+c e^2 x^2\right )^{1+p}}{c e (3+2 p)} \]

[Out]

(e*x+d)*(c*e^2*x^2+2*c*d*e*x+c*d^2)^(p+1)/c/e/(3+2*p)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {656, 623} \[ \int (d+e x)^2 \left (c d^2+2 c d e x+c e^2 x^2\right )^p \, dx=\frac {(d+e x) \left (c d^2+2 c d e x+c e^2 x^2\right )^{p+1}}{c e (2 p+3)} \]

[In]

Int[(d + e*x)^2*(c*d^2 + 2*c*d*e*x + c*e^2*x^2)^p,x]

[Out]

((d + e*x)*(c*d^2 + 2*c*d*e*x + c*e^2*x^2)^(1 + p))/(c*e*(3 + 2*p))

Rule 623

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x)*((a + b*x + c*x^2)^p/(2*c*(2*p + 1)
)), x] /; FreeQ[{a, b, c, p}, x] && EqQ[b^2 - 4*a*c, 0] && NeQ[p, -2^(-1)]

Rule 656

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[e^m/c^(m/2), Int[(a +
b*x + c*x^2)^(p + m/2), x], x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[b^2 - 4*a*c, 0] &&  !IntegerQ[p] && EqQ[
2*c*d - b*e, 0] && IntegerQ[m/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \left (c d^2+2 c d e x+c e^2 x^2\right )^{1+p} \, dx}{c} \\ & = \frac {(d+e x) \left (c d^2+2 c d e x+c e^2 x^2\right )^{1+p}}{c e (3+2 p)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.79 \[ \int (d+e x)^2 \left (c d^2+2 c d e x+c e^2 x^2\right )^p \, dx=\frac {(d+e x) \left (c (d+e x)^2\right )^{1+p}}{c e (1+2 (1+p))} \]

[In]

Integrate[(d + e*x)^2*(c*d^2 + 2*c*d*e*x + c*e^2*x^2)^p,x]

[Out]

((d + e*x)*(c*(d + e*x)^2)^(1 + p))/(c*e*(1 + 2*(1 + p)))

Maple [A] (verified)

Time = 2.58 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.95

method result size
gosper \(\frac {\left (e x +d \right )^{3} \left (c \,x^{2} e^{2}+2 x c d e +c \,d^{2}\right )^{p}}{e \left (3+2 p \right )}\) \(41\)
risch \(\frac {\left (e^{3} x^{3}+3 d \,e^{2} x^{2}+3 d^{2} e x +d^{3}\right ) \left (c \left (e x +d \right )^{2}\right )^{p}}{e \left (3+2 p \right )}\) \(50\)
parallelrisch \(\frac {x^{3} {\left (c \left (x^{2} e^{2}+2 d e x +d^{2}\right )\right )}^{p} d \,e^{3}+3 x^{2} {\left (c \left (x^{2} e^{2}+2 d e x +d^{2}\right )\right )}^{p} d^{2} e^{2}+3 x {\left (c \left (x^{2} e^{2}+2 d e x +d^{2}\right )\right )}^{p} d^{3} e +{\left (c \left (x^{2} e^{2}+2 d e x +d^{2}\right )\right )}^{p} d^{4}}{d \left (3+2 p \right ) e}\) \(126\)
norman \(\frac {d^{3} {\mathrm e}^{p \ln \left (c \,x^{2} e^{2}+2 x c d e +c \,d^{2}\right )}}{e \left (3+2 p \right )}+\frac {e^{2} x^{3} {\mathrm e}^{p \ln \left (c \,x^{2} e^{2}+2 x c d e +c \,d^{2}\right )}}{3+2 p}+\frac {3 d^{2} x \,{\mathrm e}^{p \ln \left (c \,x^{2} e^{2}+2 x c d e +c \,d^{2}\right )}}{3+2 p}+\frac {3 d e \,x^{2} {\mathrm e}^{p \ln \left (c \,x^{2} e^{2}+2 x c d e +c \,d^{2}\right )}}{3+2 p}\) \(153\)

[In]

int((e*x+d)^2*(c*e^2*x^2+2*c*d*e*x+c*d^2)^p,x,method=_RETURNVERBOSE)

[Out]

(e*x+d)^3/e/(3+2*p)*(c*e^2*x^2+2*c*d*e*x+c*d^2)^p

Fricas [A] (verification not implemented)

none

Time = 0.39 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.40 \[ \int (d+e x)^2 \left (c d^2+2 c d e x+c e^2 x^2\right )^p \, dx=\frac {{\left (e^{3} x^{3} + 3 \, d e^{2} x^{2} + 3 \, d^{2} e x + d^{3}\right )} {\left (c e^{2} x^{2} + 2 \, c d e x + c d^{2}\right )}^{p}}{2 \, e p + 3 \, e} \]

[In]

integrate((e*x+d)^2*(c*e^2*x^2+2*c*d*e*x+c*d^2)^p,x, algorithm="fricas")

[Out]

(e^3*x^3 + 3*d*e^2*x^2 + 3*d^2*e*x + d^3)*(c*e^2*x^2 + 2*c*d*e*x + c*d^2)^p/(2*e*p + 3*e)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 216 vs. \(2 (37) = 74\).

Time = 2.03 (sec) , antiderivative size = 216, normalized size of antiderivative = 5.02 \[ \int (d+e x)^2 \left (c d^2+2 c d e x+c e^2 x^2\right )^p \, dx=\begin {cases} \frac {d^{2} x}{\left (c d^{2}\right )^{\frac {3}{2}}} & \text {for}\: e = 0 \wedge p = - \frac {3}{2} \\d^{2} x \left (c d^{2}\right )^{p} & \text {for}\: e = 0 \\\frac {\left (\frac {d}{e} + x\right ) \log {\left (\frac {d}{e} + x \right )}}{c \sqrt {c e^{2} \left (\frac {d}{e} + x\right )^{2}}} & \text {for}\: p = - \frac {3}{2} \\\frac {d^{3} \left (c d^{2} + 2 c d e x + c e^{2} x^{2}\right )^{p}}{2 e p + 3 e} + \frac {3 d^{2} e x \left (c d^{2} + 2 c d e x + c e^{2} x^{2}\right )^{p}}{2 e p + 3 e} + \frac {3 d e^{2} x^{2} \left (c d^{2} + 2 c d e x + c e^{2} x^{2}\right )^{p}}{2 e p + 3 e} + \frac {e^{3} x^{3} \left (c d^{2} + 2 c d e x + c e^{2} x^{2}\right )^{p}}{2 e p + 3 e} & \text {otherwise} \end {cases} \]

[In]

integrate((e*x+d)**2*(c*e**2*x**2+2*c*d*e*x+c*d**2)**p,x)

[Out]

Piecewise((d**2*x/(c*d**2)**(3/2), Eq(e, 0) & Eq(p, -3/2)), (d**2*x*(c*d**2)**p, Eq(e, 0)), ((d/e + x)*log(d/e
 + x)/(c*sqrt(c*e**2*(d/e + x)**2)), Eq(p, -3/2)), (d**3*(c*d**2 + 2*c*d*e*x + c*e**2*x**2)**p/(2*e*p + 3*e) +
 3*d**2*e*x*(c*d**2 + 2*c*d*e*x + c*e**2*x**2)**p/(2*e*p + 3*e) + 3*d*e**2*x**2*(c*d**2 + 2*c*d*e*x + c*e**2*x
**2)**p/(2*e*p + 3*e) + e**3*x**3*(c*d**2 + 2*c*d*e*x + c*e**2*x**2)**p/(2*e*p + 3*e), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 182 vs. \(2 (43) = 86\).

Time = 0.22 (sec) , antiderivative size = 182, normalized size of antiderivative = 4.23 \[ \int (d+e x)^2 \left (c d^2+2 c d e x+c e^2 x^2\right )^p \, dx=\frac {{\left (c^{p} e x + c^{p} d\right )} {\left (e x + d\right )}^{2 \, p} d^{2}}{e {\left (2 \, p + 1\right )}} + \frac {{\left (c^{p} e^{2} {\left (2 \, p + 1\right )} x^{2} + 2 \, c^{p} d e p x - c^{p} d^{2}\right )} {\left (e x + d\right )}^{2 \, p} d}{{\left (2 \, p^{2} + 3 \, p + 1\right )} e} + \frac {{\left ({\left (2 \, p^{2} + 3 \, p + 1\right )} c^{p} e^{3} x^{3} + {\left (2 \, p^{2} + p\right )} c^{p} d e^{2} x^{2} - 2 \, c^{p} d^{2} e p x + c^{p} d^{3}\right )} {\left (e x + d\right )}^{2 \, p}}{{\left (4 \, p^{3} + 12 \, p^{2} + 11 \, p + 3\right )} e} \]

[In]

integrate((e*x+d)^2*(c*e^2*x^2+2*c*d*e*x+c*d^2)^p,x, algorithm="maxima")

[Out]

(c^p*e*x + c^p*d)*(e*x + d)^(2*p)*d^2/(e*(2*p + 1)) + (c^p*e^2*(2*p + 1)*x^2 + 2*c^p*d*e*p*x - c^p*d^2)*(e*x +
 d)^(2*p)*d/((2*p^2 + 3*p + 1)*e) + ((2*p^2 + 3*p + 1)*c^p*e^3*x^3 + (2*p^2 + p)*c^p*d*e^2*x^2 - 2*c^p*d^2*e*p
*x + c^p*d^3)*(e*x + d)^(2*p)/((4*p^3 + 12*p^2 + 11*p + 3)*e)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 127 vs. \(2 (43) = 86\).

Time = 0.29 (sec) , antiderivative size = 127, normalized size of antiderivative = 2.95 \[ \int (d+e x)^2 \left (c d^2+2 c d e x+c e^2 x^2\right )^p \, dx=\frac {{\left (c e^{2} x^{2} + 2 \, c d e x + c d^{2}\right )}^{p} e^{3} x^{3} + 3 \, {\left (c e^{2} x^{2} + 2 \, c d e x + c d^{2}\right )}^{p} d e^{2} x^{2} + 3 \, {\left (c e^{2} x^{2} + 2 \, c d e x + c d^{2}\right )}^{p} d^{2} e x + {\left (c e^{2} x^{2} + 2 \, c d e x + c d^{2}\right )}^{p} d^{3}}{2 \, e p + 3 \, e} \]

[In]

integrate((e*x+d)^2*(c*e^2*x^2+2*c*d*e*x+c*d^2)^p,x, algorithm="giac")

[Out]

((c*e^2*x^2 + 2*c*d*e*x + c*d^2)^p*e^3*x^3 + 3*(c*e^2*x^2 + 2*c*d*e*x + c*d^2)^p*d*e^2*x^2 + 3*(c*e^2*x^2 + 2*
c*d*e*x + c*d^2)^p*d^2*e*x + (c*e^2*x^2 + 2*c*d*e*x + c*d^2)^p*d^3)/(2*e*p + 3*e)

Mupad [B] (verification not implemented)

Time = 9.87 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.84 \[ \int (d+e x)^2 \left (c d^2+2 c d e x+c e^2 x^2\right )^p \, dx={\left (c\,d^2+2\,c\,d\,e\,x+c\,e^2\,x^2\right )}^p\,\left (\frac {3\,d^2\,x}{2\,p+3}+\frac {d^3}{e\,\left (2\,p+3\right )}+\frac {e^2\,x^3}{2\,p+3}+\frac {3\,d\,e\,x^2}{2\,p+3}\right ) \]

[In]

int((d + e*x)^2*(c*d^2 + c*e^2*x^2 + 2*c*d*e*x)^p,x)

[Out]

(c*d^2 + c*e^2*x^2 + 2*c*d*e*x)^p*((3*d^2*x)/(2*p + 3) + d^3/(e*(2*p + 3)) + (e^2*x^3)/(2*p + 3) + (3*d*e*x^2)
/(2*p + 3))